// 此处存储所有与书元信息录入相关的请求
import request from '@/utils/request'

// 获取书目录入列表数据，支持分页查询 、查询书目
export const getBookInputData = (pageSize, currentPage, bookName) => {
  return request.get('/entry', {
    params: {
      pageSize,
      page: currentPage,
      bookName
    }
  })
}

//  查询这本书有多少个最小单位，获取图片和经典版对照
export const getBookInputCatalog = (bookId, bookName, index, sentenceIndex) => {
  return request.get('/entry/catalogAndAll', {
    params: {
      bookId,
      bookName,
      index, // 第几卷
      sentenceIndex // 当前卷第几句
    }
  })
}

// 提交一个句子
export const handleSentence = (sentenceForm) => {
  return request.post('/entry', sentenceForm)
}
